﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ConfiguationManagement;
using DataCom;
using DataCommunication;

namespace ConfigurationFactory
{
    public class DataCommunicationFactory
    {
        public static ILineInfoDataAccess GetLineInfoDataAccess()
        {
            ILineInfoDataAccess dataAccess = null;
            DataBase db = CfgManager.GetDataBase();
            switch (db)
            {
                case DataBase.XML:

                    break;
                case DataBase.SqlServer:

                    dataAccess = new LineInfoDataAccess();
                    break;
                case DataBase.Oracle:

                    break;
                default:
                    break;
            }
            return dataAccess;
        }

        public static ILineShiftDataAccess GetLineShiftDataAccess()
        {
            ILineShiftDataAccess dataAccess = null;
            DataBase db = CfgManager.GetDataBase();
            switch (db)
            {
                case DataBase.XML:

                    break;
                case DataBase.SqlServer:

                    dataAccess = new LineShiftDataAccess();
                    break;
                case DataBase.Oracle:

                    break;

                default:
                    break;
            }
            return dataAccess;
        }

        public static IProductInfoDataAccess GetProductInfoDataAccess()
        {
            IProductInfoDataAccess dataAccess = null;
            DataBase db = CfgManager.GetDataBase();
            switch (db)
            {
                case DataBase.XML:

                    break;
                case DataBase.SqlServer:

                    dataAccess = new ProductInfoDataAccess();
                    break;
                case DataBase.Oracle:
                    break;
                default:
                    break;
            }
            return dataAccess;
        }
    }
}
